<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Responsive Layout</title>
    <style>
        body {
            margin: 0;
            padding: 0;
        }

        .container {
            height: 200px;
            margin: 50px auto;
            text-align: center;
            line-height: 200px;
            font-size: 24px;
        }

        @media (max-width: 400px) {
            .container {
                background-color: gray;
            }
        }

        @media (min-width: 401px) and (max-width: 800px) {
            .container {
                background-color: red;
            }
        }

        @media (min-width: 801px) {
            .container {
                background-color: blue;
            }
        }
    </style>
</head>

<body>
    <div class="container">响应式布局</div>
</body>

</html>